#if !defined(_APP_GY__)
#define _APP_GY__
#include "main.h"
#include "FreeRTOS.h"
#include "task.h"
#include "app_uartDMA.h"

#include "time.h"

typedef struct protocol_handle_s
{
	void (*package_message)(uint8_t *data, int len);
	int (*get_net_time)(float tim);
	void (*package_realtimedata)(int breathrate, int strokeRisk, int inBedtime, int stateInBbed, int *bodyMovementData);
	void (*package_realsosdata)(int breathrate, int strokeRisk, int inBedtime, int stateInBbed, int *bodyMovementData,uint8_t sosflag,uint8_t current_threshold,uint8_t on_bed_duration_minutes, uint8_t sitting_alarm_duration_minutes,uint8_t falling_alarm_duration_minutes,uint8_t merged_alarm);
	void (*get_net_status)(void);
	void (*start_net_config)(void);
	void (*package_oneminsdata)(int ratemin, int strokeriskmin, int *statesleep, int timestamp, int mean, unsigned char *martix, uint8_t bedType);
	void (*package_riskreportingdata)(unsigned char *martix);
	void (*send_SoScoordinateArr)(void);
	void (*config_production)(void);
	void (*config_production_anyitong)(void);
	void (*clean_productionid)(void);
	void (*send_mcu_version)(uint8_t version1, uint8_t version2, uint8_t version3);
	int (*start_factory_test)(void);
	void (*get_4G_IMEI)(void);
	void(*package_A0message)(uint8_t current_threshold,uint8_t on_bed_duration_minutes, uint8_t sitting_alarm_duration_minutes,uint8_t falling_alarm_duration_minutes,uint8_t merged_alarm);
} PROTOCOL_HANDLE;

extern PROTOCOL_HANDLE protocol_handle;

uint8_t get_net_led(void);

void set_net_led(uint8_t led_status);

#endif // _APP_GY__
